package SPAN::Method::NonLinearEquation::FalsePosition;

use warnings;
use strict;
use Math::Calculus::FalsePosition;
use Reaction::Class;

use Reaction::Types::Core;
use SPAN::Types::Math::Calculus;

class FalsePosition is 'SPAN::Method', which {

    implements backend      => as {'Math::Calculus::FalsePosition'};
    implements display_name => as {'False Position'};

    has expression => (
        isa    => 'Expression',
        is     => 'rw',
        set_or_lazy_fail('expression')
    );
    has variable =>
        ( isa => 'Variable', is => 'rw', set_or_lazy_fail('variable') );
    has start => ( isa => 'Real', is => 'rw', set_or_lazy_fail('start') );
    has end   => ( isa => 'Real', is => 'rw', set_or_lazy_fail('end') );
    has precision =>
        ( isa => 'PositiveInt', is => 'rw', set_or_lazy_fail('precision') );
};

1;
